package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/11.
 */

public class ClubInfo {

    /**
     * id : 1
     * pic : http://10.0.2.2/laravel54/public/Uploads/2017-09-06-05-13-17-59af83ed534c2.jpg
     * name : 123
     * intro : 123
     * head : 123
     * address : 123
     * phone : 123123131
     * time : 8：00-21:00
     * num : 0
     * type : 0
     */

    private int id;
    private String pic;
    private String name;
    private String intro;
    private String head;
    private String address;
    private String phone;
    private String time;
    private String num;
    private int type;

    public static ClubInfo objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ClubInfo.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setHead(String head) {
        this.head = head;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getId() {
        return id;
    }

    public String getPic() {
        return pic;
    }

    public String getName() {
        return name;
    }

    public String getIntro() {
        return intro;
    }

    public String getHead() {
        return head;
    }

    public String getAddress() {
        return address;
    }

    public String getPhone() {
        return phone;
    }

    public String getTime() {
        return time;
    }

    public String getNum() {
        return num;
    }

    public int getType() {
        return type;
    }
}
